import request from '@/utils/request'
/**
 * @description: 登录
 * @param {*} mobile 手机号
 * @param {*} code  验证码
 * @return {*}
 */
export const login = (mobile, code) => {
  return request({
    method: 'POST',
    url: '/app/v1_0/authorizations',
    data: {
      mobile,
      code
    }
  })
}
/**
 * @description: 获取用户信息
 * @param {*} mobile 手机号
 * @return {*}
 */
export const getProfile = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/user/profile'
    // headers: {
    //   // Authorization: 'Bearer token值' 之间有空格
    //   Authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MDU2MDg3NjgsInVzZXJfaWQiOjExMDI0OTA1MjI4Mjk3MTc1MDQsInJlZnJlc2giOmZhbHNlfQ.SQnkjLkNy78uBzeHgg1CxEdHW1pw4m7B7LD6LaJ62-o'
    // }
  })
}
